﻿using SYMetro.DataObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YiDa.Infrastructure;

namespace SYMetro.ServiceContract.Membership
{
    public interface IRoleService : IApplicationServiceContract
    {
        RoleDataObjectList CreateRoles(RoleDataObjectList roles);

        void DeleteRole(IDList ids, bool throwOnPopulatedRole);

        bool DeleteRole(string roleName, bool throwOnPopulatedRole);

        void RemoveUsersFromRoles(string[] userNames, string[] roleNames);

        void AddUsersToRoles(string[] userNames, string[] roleNames);

        bool IsUserInRole(string userName, string roleName);

        bool RoleExists(string roleName);

        UserDataObjectList FindUsersInRole(string roleName, string usernameToMatch);

        RoleDataObjectList GetAllRoles();

        RoleDataObjectList GetRolesForUser(string userName);

        UserDataObjectList GetUsersInRole(string roleName);

        RoleDataObject GetRoleByName(string roleName);

        RoleDataObject GetRoleByID(Guid id);

        RoleDataObjectList GetRolesByParentId(Guid id);

        UserDataObjectList FindUsersInRole(Guid roleId);
    }
}
